<?php

include '../../../configuration.php';

$smarty->template_dir = LOCAL_PATH.'administrator/main/templates/';
$smarty->compile_dir = LOCAL_PATH.'administrator/main/templates_c/';
$smarty->config_dir = LOCAL_PATH.'administrator/main/configs';

$smarty->compile_check = true;
//$smarty->debugging = true;

$faculties[] = "";
$faculty_ids[] = "";
$groups = array();
$group_ids = array();


$result = mysql_query("SELECT * FROM `faculties`");
while ($rows = mysql_fetch_array($result,MYSQL_ASSOC)) {
	$faculties[] = $rows["faculty_name"];
	$faculty_ids[] = $rows["faculty_id"];
}
$result2 = mysql_query("SELECT * FROM `groups`");
while ($rows2 = mysql_fetch_array($result2,MYSQL_ASSOC)) {
	$groups[] = $rows2["group_name"];
	$group_ids[] = $rows2["group_id"];
}

$smarty->assign('faculties',$faculties);
$smarty->assign('faculty_ids',$faculty_ids);
$smarty->assign('groups',$groups);
$smarty->assign('group_ids',$group_ids);
$smarty->assign('rdate',date('Y-m-d H:i:s'));

include '../../check.php';

if ($checking == 1) {
	$smarty->display('add_new_user.tpl');
}
else echo "You are not autorised!"; exit;

?>